import {companyAudit, companyList, userInfo, userList, editUser, delUser} from '@/services/account/AccountService';

export default {
    namespace: 'accountModel',

    state: {},

    effects: {
        /**
         * 企业注册管理（用户管理）查询接口
         */* companyList({payload, callback}, {call, put}) {
            const response = yield call(companyList, payload);
            if (callback) callback(response);
        },
        /**
         * 企业信息审批接口
         */* companyAudit({payload, callback}, {call, put}) {
            const response = yield call(companyAudit, payload);
            if (callback) callback(response);
        },
        /**
         * 根据用户ID获取用户信息
         */* userInfo({payload, callback}, {call, put}) {
            const response = yield call(userInfo, payload);
            if (callback) callback(response);
        },

        /**
         * 分页查询用户信息列表
         */* userList({payload, callback}, {call, put}) {
            const response = yield call(userList, payload);
            if (callback) callback(response);
        },
        /**
         * 新增/编辑用户
         */* editUser({payload, callback}, {call, put}) {
            const response = yield call(editUser, payload);
            if (callback) callback(response);
        },
        /**
         * 删除用户
         */* delUser({payload, callback}, {call, put}) {
            const response = yield call(delUser, payload);
            if (callback) callback(response);
        },
    },

    reducers: {}
}
